
//
// 版权所有 (c) 2021-2023 JR
//
// 特此免费授予获得本软件的任何人以处理本软件的权利，但须遵守以下条件：在所有副本或重要部分的软件中必须包括上述版权声明和本许可声明。
//
// 软件按“原样”提供，不提供任何形式的明示或暗示的保证，包括但不限于对适销性、适用性和非侵权的保证。
// 在任何情况下，作者或版权持有人均不对任何索赔、损害或其他责任负责，无论是因合同、侵权或其他方式引起的，与软件或其使用或其他交易有关。

namespace EMC.VISITOR.Core;

/// <summary>
/// 全局分页查询输入参数
/// </summary>
public class BasePageInput
{
    /// <summary>
    /// 当前页码
    /// </summary>
    [DataValidation(ValidationTypes.Numeric)]
    [ExporterHeader(IsIgnore = true)]
    public virtual int Page { get; set; } = 1;

    /// <summary>
    /// 页码容量
    /// </summary>
    //[Range(0, 100, ErrorMessage = "页码容量超过最大限制")]
    [DataValidation(ValidationTypes.Numeric)]
    [ExporterHeader(IsIgnore = true)]
    public virtual int PageSize { get; set; } = 20;

    /// <summary>
    /// 排序字段
    /// </summary>
    [ExporterHeader(IsIgnore = true)]
    public virtual string Field { get; set; }

    /// <summary>
    /// 排序方向
    /// </summary>
    [ExporterHeader(IsIgnore = true)]
    public virtual string Order { get; set; }
    /// <summary>
    /// 前端路由
    /// </summary>
    [ExporterHeader(IsIgnore = true)]
    public virtual string FrontPath { get; set; }
    /// <summary>
    /// App查询
    /// </summary>
    [ExporterHeader(IsIgnore = true)]
    public virtual string AppQuery { get; set; }
    /// <summary>
    /// 降序排序
    /// </summary>
    [ExporterHeader(IsIgnore = true)]
    public virtual string DescStr { get; set; } = "descending";

    /// <summary>
    /// 0：查询所有    1：已关联工单   2：未关联工单
    /// </summary>
    [ExporterHeader(IsIgnore = true)]
    public virtual string TempString1 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual string TempString2 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual string TempString3 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual string TempString4 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual string TempString5 { get; set; }
    /// <summary>
    /// 派工单开完工页面 0：状态未完工   1：状态已完工
    /// </summary>
    [ExporterHeader(IsIgnore = true)]
    public virtual int TempInt1 { get; set; }

    [ExporterHeader(IsIgnore = true)]
    public virtual int TempInt2 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual int TempInt3 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual int TempInt4 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual int TempInt5 { get; set; }
    [ExporterHeader(IsIgnore = true)]
    public virtual List<string[]> Filters { get; set; }
}

public class BaseOutput
{
    [JsonProperty("$cellEdit")]
    public bool? cellEdit { get; set; } = true;

    public virtual DateTime? CreateTime { get; set; }
}